package com.zbl.zblproject.erp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/10/8
 * ERP 商品分类
 */
@TableName("zbl_category")
public class ErpCategory {

    @TableId(type = IdType.AUTO)
    private int catId;

    /**
     * 名称
     */
    private String catName;

    private String keywords;

    /**
     * 备注
     */
    private String catDesc;

    /**
     * 父级ID
     */
    private int parentId;

    /**
     * 排序ID
     */
    private int sortOrder;

    private String templateFile;

    /**
     * 单位
     */
    private String measureUnit;

    /**
     * 显示在栏目上
     */
    private int showInNav;

    private String style;

    /**
     * 是否显示
     */
    private int isShow;

    private int grade;

    private String filterAttr;

    @TableField(exist = false)
    private List<ErpCategory> children;


    public int getCatId() {
        return catId;
    }

    public void setCatId(int catId) {
        this.catId = catId;
    }

    public String getCatName() {
        return catName;
    }

    public void setCatName(String catName) {
        this.catName = catName;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getCatDesc() {
        return catDesc;
    }

    public void setCatDesc(String catDesc) {
        this.catDesc = catDesc;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(int sortOrder) {
        this.sortOrder = sortOrder;
    }

    public String getTemplateFile() {
        return templateFile;
    }

    public void setTemplateFile(String templateFile) {
        this.templateFile = templateFile;
    }

    public String getMeasureUnit() {
        return measureUnit;
    }

    public void setMeasureUnit(String measureUnit) {
        this.measureUnit = measureUnit;
    }

    public int getShowInNav() {
        return showInNav;
    }

    public void setShowInNav(int showInNav) {
        this.showInNav = showInNav;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public int getIsShow() {
        return isShow;
    }

    public void setIsShow(int isShow) {
        this.isShow = isShow;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public String getFilterAttr() {
        return filterAttr;
    }

    public void setFilterAttr(String filterAttr) {
        this.filterAttr = filterAttr;
    }

    public List<ErpCategory> getChildren() {
        return children;
    }

    public void setChildren(List<ErpCategory> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "ErpCategory{" +
                "catId=" + catId +
                ", catName='" + catName + '\'' +
                ", keywords='" + keywords + '\'' +
                ", catDesc='" + catDesc + '\'' +
                ", parentId=" + parentId +
                ", sortOrder=" + sortOrder +
                ", templateFile='" + templateFile + '\'' +
                ", measureUnit='" + measureUnit + '\'' +
                ", showInNav=" + showInNav +
                ", style='" + style + '\'' +
                ", isShow=" + isShow +
                ", grade=" + grade +
                ", filterAtter='" + filterAttr + '\'' +
                '}';
    }
}
